using Mapster;

namespace Abc.Application
{
    /// <summary>
    /// ServiceMapper
    /// </summary>
    public class NoticeOutMapper : IRegister
    {
        public void Register(TypeAdapterConfig config)
        {
            // 示例
            //config.ForType<__EFMigrationsHistory,__EFMigrationsHistoryDto>()
            //.Map(dest => dest.MigrationId, src => src.MigrationId)//
            //.Map(dest => dest.ProductVersion, src => src.ProductVersion)//
            //;

            // Description 通知
            //config.ForType<Notice,NoticeOut>()
            //.Map(dest => dest.Id, src => src.Id)// ID
            //.Map(dest => dest.TypeCode, src => src.TypeCode)// 通知类型代码
            //.Map(dest => dest.Title, src => src.Title)// 标题
            //.Map(dest => dest.Content, src => src.Content)// 内容
            //.Map(dest => dest.IsRead, src => src.IsRead)// 是否读取
            //.Map(dest => dest.IsReadName, src => src.IsRead?"是":"否")// 是否读取
            //.Map(dest => dest.ReadTime, src => src.ReadTime)// 读取状态
            //.Map(dest => dest.UserId, src => src.UserId)// 用户ID
            //.Map(dest => dest.ExtensionData, src => src.ExtensionData)// 扩展json数据字段
            //.Map(dest => dest.CreatorUserId, src => src.CreatorUserId)// 创建用户ID
            //.Map(dest => dest.CreatorUserName, src => src.CreatorUserName)// 创建用户
            //.Map(dest => dest.CreationTime, src => src.CreationTime!=null?src.CreationTime.Value.ToString("yyyy-MM-dd HH:mm:ss"):"")// 创建时间
            //;
        }
    }
}